#include <iostream>
#include "RPCServer.h" 
#include "hello.pb.h"

class MyServer :public RPCServer<tutorial::Person>
{
public: 
	MyServer(std::string sAddr): RPCServer(sAddr){}

	virtual bool OnCall(tutorial::Person param){ std::cout << "Recieve:" << param.name() << std::endl; return false; }
};

int main() 
{
	MyServer server("tcp://*:6666"); 
	std::cout << "Server listening..." << std::endl;
	while (true) {
		server.Loop();
		sleep(1);
	}
	return 0;
}